<template>
  <div>
    <div class="shoplist_container">
      <ul v-if="list.length">
        <nuxt-link v-for="item in list" :key="item.COUNTNUM" :to="{name:'curePatient',params:{name:item.PATIENTNAME,info:item.PATIENTBASEINFO,symptom:item.PATIENTSYMPTOM,time:item.LASTUPDATESYMPTOMTIME}}" tag="li">
          <div class="shop_right">
            <p class="shop_name"><span>姓名：{{item.PATIENTNAME}}</span><span class="patient_time">{{item.LASTUPDATESYMPTOMTIME}}</span></p>
            <p class="shop_message">{{item.PATIENTBASEINFO}}</p>
            <p class="fee_distance">症状：{{item.PATIENTSYMPTOM}}</p>
            <p class="fee_distance">治疗：{{item.PATIENTIMAGEPATH}}</p>
          </div>
        </nuxt-link>
      </ul>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      list:[],
      ts: this.newStore(),
    };
  },
    created() {
    this.getPatientlist(this.today);
  },
  methods: {
    getPatientlist(day) {
      this.curDay = day;
      var req = JSON.stringify({"OTRequest":  {"VERSION":"1.0",   "TN":"F27.APP.01.16",   "CLIENTID":"YLAPP",   "RYBID":"DOCTOR", "TOKEN":"Ekzmrq5qIPxtYdlDKpLACV5vbxHsCfzJHnpOImO8qOj5ZngSq5kVFFTG5JQZjHf3" , "DATA":{"doctorId":this.$root.doctorInfo.doctorId,"rowsperpage":"20","pageno":"1","ordercolumn":"lastUpdateSymptomTime", "ordertype":"asc", "patientId":""}}});

      this.spost(this.ts, "/doctor/debug/AppMainServlet.ap", {
        "":req
      }).then((ts)=>{this.list=ts.d.DATAOBJ.DATA;
      });
    }
  }
};
</script>
<style>
*{
  margin: 0;
  padding: 0;
}
.shoplist_container{
  padding-top: 3rem;
  background: #fff;
  margin-bottom: 4rem;
}
.shop_right{
  padding:0.4rem 1rem 0 1rem;
  border-bottom: 1px solid #f1f1f1;
}
.shop_name{
    color: #333;
    font: 0.85rem/0.85rem "PingFangSC-Regular";
    font-weight: 700;
}
.shop_message{
    font-size: 0.5rem;
    color: #333;
}
.fee_distance{
    font-size: 0.5rem;
    color: #666;
}
.patient_time{
  font-size: 0.4rem;
  color:#3190e8;
  float: right;
}
</style>

